package com.bawei.es.service;

import com.bawei.common.core.domain.R;
import com.bawei.system.domain.EsParams;
import org.elasticsearch.common.settings.Settings;

import java.util.List;
import java.util.Map;

/**
 * @author 86181
 */
public interface EsIndexService {
    R<Boolean> indexCreate(String indexName, Settings settings);

    R<Boolean> indexExit(String indexName);

    R<Boolean> indexDelete(String indexName);

    R<Boolean> indexCreateWithMapping(String indexName, String indexMapping);

    R<Map> indexGetMapping(String indexName);

    Map<String, Object> getIndexDetails(String indexName);

    boolean indexUpdate(String indexName, EsParams esParams);

    R<List<String>> getAllIndex();
}
